import 'package:flutter_projectname_getx/api/Apis.dart';
import 'package:flutter_projectname_getx/dio/dio_util.dart';
import 'package:flutter_projectname_getx/generated/json/base/json_convert_content.dart';

import 'error_data.dart';

/// <summary>
/// todo: 测试
/// author：zwb
/// dateTime：2021/9/2 17:44
/// filePath：lib/service/test_service.dart 
/// desc: 
/// <summary>
///
class TestServices {
  
  /// todo：测试示例
  static Future<T> test<T>() async {
    var data = await DioUtil.instance.get(path: ApisTest.test);
    T t = JsonConvert.fromJsonAsT(checkMap(data) ? data : errorData(data: data, entity: T),);
    return t;
  }
}
